import instance from '../util/request'

/**
 * 获取所有种类
 * @returns  
 */
export const category_list = ()=>{ 
  return instance.get("/category")
}

/**
 * 分页获取所有种类
 * @returns  
 */
export const category_page = (page)=>{ 
  return instance.get("/category/page",{
    params:page
  })
}


/**
 * 添加种类
 * @returns  
 */
export const category_add = (data)=>{ 
  return instance.post("/category",{
    headers:{'Content-Type':'application/json'},
    data:data
  })
}

/**
 * 添加种类
 * @returns  
 */
export const category_del = (data)=>{ 
  return instance.delete("/category",{
    params:data
  })
}